package com.lsj.entity;

import lombok.Data;

@Data
public class RespBean {
    private Integer code;
    private String msg;
    private Object data;


    public static RespBean ok(String msg,Object data){
        RespBean respBean = new RespBean();
        respBean.code = 200;
        respBean.msg = msg;
        respBean.data = data;
        return respBean;
    }
    public static RespBean error(){
        RespBean respBean = new RespBean();
        respBean.code = 400;
        return respBean;
    }
    public static RespBean error(String msg){
        RespBean respBean = new RespBean();
        respBean.code = 400;
        respBean.msg = msg;
        return respBean;
    }
}
